package com.wb.mianxiangduixiang;

/**
 * @author 黄衡熙
 * @version 1.0
 * @date 2025年07月18日15:04
 */
public class Test_fangwenxiushifu {
    public static void main(String[] agrs){
        One one=new One(1,"张三",1000.0,"男");
        //System.out.println(one.id);
        System.out.println(one.name);
        System.out.println(one.salary);
        System.out.println(one.gender);
        one.test01();
        one.test02();
        one.test03();
        //one.test04();
    }
}

class One{
    int age;
    private int id;
    String name;
    protected double salary;
    public String gender;

    public One(int id, String name, double salary, String gender) {
        this.id = id;
        this.name = name;
        this.salary = salary;
        this.gender = gender;
    }

    public void test01() {
        System.out.println("public修饰的");
    }

    protected void test02() {
        System.out.println("protected修饰的");
    }

    void test03() {
        System.out.println("这是没有修饰符");
    }

    private void test04() {
        System.out.println("这是private修饰的");
    }



}
